import {lazy} from "react"
import {Navigate} from "react-router-dom"
const Detail = lazy(()=>import("../pages/detail"))
const Home =lazy(()=>import("../pages/home"))
const ShopHome = lazy(()=>import("../pages/shophome"))
const Shopcar = lazy(()=>import("../pages/shopcar"))
const routerconfig = [
    {
        path:"/detail",
        element:<Detail></Detail>
    },
    {
        path:"/home",
        element:<Home></Home>,
        children:[
            {
                path:"/home/shophome",
                element:<ShopHome></ShopHome>
            },
            {
                path:"/home/shopcar",
                element:<Shopcar></Shopcar>
            }
          
        ]
    },
    {
        path:"/",
        element:<Navigate to="/home/shophome"></Navigate>
    }
]
export default routerconfig